﻿using System;
using System.Collections.Generic;
using System.Text;
using ZgOffice.IServices;
using ZgOffice.Entities;
using ZgOffice.DAL;
using System.Data;
using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO.Compression;
using Common;
using System.ServiceModel;
using ZgOffice.Services;


namespace ZgOffice.Services
{
    [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)]
    public class OfficeService : DataTransfers,IOfficeService
    {
        public int Sum(params int[] numbers)
        {
            int result = 0;
            foreach (int n in numbers)
            {
                result += n;
            }
            return result;
        }
        public bool Login(LoginType lt)
        {
            BaseInfoDAL bid = new BaseInfoDAL();
            return bid.LoginCheck(lt);
        }
        public DataSet ReadSystemListTreeView()
        {
            BaseInfoDAL bid = new BaseInfoDAL();
            return bid.ReadSystemListTreeView();
        }
        public DataSet ReadDIYTable(string tableName)
        {
            BaseInfoDAL bid = new BaseInfoDAL();
            return bid.ReadDIYTable(tableName);
        }
        public DataSet ReadDiyTableListTreeView()
        {
            BaseInfoDAL bid = new BaseInfoDAL();
            return bid.ReadDiyTableListTreeView();
        }
        public DataSet ReadSysListTree()
        {
            BaseInfoDAL bid = new BaseInfoDAL();
            return bid.ReadSysListTree();
        }
    }
}
